<!-- 企业信息 -->

<template>
    <div class="enterprise-info-page">
        <EnterpriseInfoCard class="enterprise-info-card" />
        <EditEnterpriseInfo ref="childenRef" @editData="editData"/>
        <button class="change-btn" @click="handleEdit">修改</button>
    </div>
</template>

<script>
import { ref } from 'vue'
import EditEnterpriseInfo from '@/components/EditEnterpriseInfo.vue'
import EnterpriseInfoCard from '@/components/EnterpriseInfoCard.vue'

export default {
    components: {
        EnterpriseInfoCard,
        EditEnterpriseInfo
    },
    setup() {
        const childenRef = ref(null)
        // 点击编辑
        function handleEdit() {
            childenRef.value.showDialog()
        }
        // 编辑弹窗点提交回调
        function editData(item) {
            console.log('修改信息', item);
        }
        return {
            handleEdit,
            childenRef,
            editData
        }
    }
}
</script>

<style scoped>
.enterprise-info-page {
    height: calc(100% - 60px);
    padding: 40px 20px 20px 20px;
    position: relative;
}
.enterprise-info-card {
    margin-bottom: 30px;
}
.change-btn {
    width: 90px;
    height: 30px;
    position: absolute;
    bottom: 30px;
    right: 30px;
    border: none;
    background: linear-gradient(90deg, #74DB98 0%, #5AC0AA 100%);
    color: white;
    border-radius: 5px;
}
</style>